< Introduction | Contents | Account Information >
In [1]:
import pandas as pd
import oandapyV20
from oandapyV20 import API
import oandapyV20.endpoints.pricing as pricing
import configparser
In [2]:
config = configparser.ConfigParser()
config.read('../config/config_v20.ini')
accountID = config['oanda']['account_id']
access_token = config['oanda']['api_key']
api = API(access_token=access_token)
In [3]:
params ={
"instruments": "EUR_USD,EUR_JPY"
}
In [4]:
r = pricing.PricingInfo(accountID=accountID, params=params)
In [5]:
rv = api.request(r)
In [6]:
print(r.response)
In [7]:
pd.DataFrame(r.response['prices'])
Out[7]:
In [8]:
r.response['prices']
Out[8]:
< Introduction | Contents | Account Information >